#!/bin/bash

set -x

SCRIPT_DIR="$(dirname "$(realpath "$0")")"
cd "$SCRIPT_DIR/.."

# Import linter
uv run --directory api --dev lint-imports

# run ruff linter
uv run --directory api --dev ruff check --fix ./

# run ruff formatter
uv run --directory api --dev ruff format ./

# run dotenv-linter linter
uv run --project api --dev dotenv-linter ./api/.env.example ./web/.env.example

# run basedpyright check
dev/basedpyright-check
